package cn.itcast.hotel.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName="hotel_sde_doc",shards = 3,replicas = 1)
public class HotelSDEDoc {
    @Field(type = FieldType.Long)
    private Long id;
     @Field(type = FieldType.Text,analyzer = "ik_max_word",store = true)
    private String name;
    @Field(type = FieldType.Double,index = true,store = true)
    private Integer price;
    @Field(type = FieldType.Keyword,index = true,store = true)
    private String brand;
    @Field(type = FieldType.Keyword,index = true,store = true)
    private String city;
}
